import {View, Input} from "@tarojs/components";
import React, {useState} from 'react'
import "./homeSure.less"
import Taro from "@tarojs/taro"
import {AtInput, AtForm} from 'taro-ui'
// import Text from "antd/es/typography/Text";

function Sure() {
    const [user,setUser]=useState({
        name:"小猪猪",
        phone:17876543678,
        address:"四川省成都市武侯区天府三街国家西部信息安全中心"
    })
    const [data,setData]=useState({
        id:1,
        name:"护摩之杖",
        price:1600,
        kuaidi:20,
        type:"黑色",
        shuliang:2
    })
    const typeClick=()=>{
        Taro.navigateTo({
            url: "../homeGoods/homeGoods"
        })
    }
    return (
        <View className="sure">
            <View className="title">确认订单</View>
            <View className="util">
                    <View className='at-icon at-icon-map-pin'/>
                    <View className="data">
                        <View className="text">{user.name}{user.phone}</View>
                        <View className="text">{user.address}</View>
                    </View>
                    <View className='at-icon at-icon-chevron-right'/>
            </View>
            <View className="util">
                    <View className='at-icon at-icon-shopping-cart'/>
                <View className="data">
                    <View className="text">{data.name}</View>
                    <View className="text">{data.type}x{data.shuliang}</View>
                </View>
                    <View className='at-icon at-icon-chevron-right' onClick={typeClick}/>
            </View>
            <View className="util">
                    <View className='at-icon at-icon-shopping-bag'/>
                <View className="data">
                    <View  className="text price">￥{data.price}</View>
                    <View  className="text">快递运费{data.kuaidi}元</View>
                </View>
                </View>
            <View className="sureClick">
            选择支付方式
            </View>
        </View>
    )
}

export default Sure